//
//  KYServerConfig.m
//  KYServerClient
//
//  Created by mrj on 16/7/1.
//  Copyright © 2016年 ikaiyong. All rights reserved.
//

#import "KYServerConfig.h"

@implementation KYServerConfig
#pragma mark - 服务器配置单例
+ (KYServerConfig*)shareServerConfig
{
    static KYServerConfig *serverConfig = nil;
    static dispatch_once_t pre;
    dispatch_once(&pre, ^{
        serverConfig = [[KYServerConfig alloc]init];
        [serverConfig initConfig];
        
    });
    
    
    return serverConfig;
}
#pragma mark - 初始化配置
- (void)initConfig{
//主网址
    self.hostUrl = [NSString stringWithFormat:@"https://%@:%@/%@",KY_SERVER_IP,KY_SERVER_PORT,KY_PROJECT_NAME];
    //保存错误日志信息
    self.saveErrLogs = [NSString stringWithFormat:@"%@/http/doc/saveErrLogs.action", self.hostUrl];
    //下载图片
   self.downloadFile = [NSString stringWithFormat:@"%@/http/doc/downloadFile.action",self.hostUrl];
    
    // 获取字典最新版本列表
    self.queryLastDicList = [NSString stringWithFormat:@"%@/http/doc/queryLastDicList.action",self.hostUrl];
    
    // 根据字典编码下载最新字典
    self.downLastDic = [NSString stringWithFormat:@"%@/http/doc/downLastDic.action",self.hostUrl];
    
    //登录
    self.memberlogin = [NSString stringWithFormat:@"%@/http/mem/memberlogin.action",self.hostUrl];
  
}
@end
